import tools as Tools
import data as Data

screen = Tools.screen
Actor = Tools.Actor
Animation = Tools.Animation

class Main:
    def __init__(self):
        Tools.Debug(3,'Part5')
    def Enter(self):
        self.Line1 = Actor('straight_line',[Tools.CentralX(),Tools.CentralY()-50])
        self.Line2 = Actor('straight_line',[Tools.CentralX(),Tools.CentralY()+50])
        self.Arrow1 = Actor('arrow',[Tools.CentralX(),-150])
        self.Arrow2 = Actor('arrow',[Data.WIDTH+150,Tools.CentralY()])
        Animation(self.Line1,'accel_decel',5,None,angle=90,y=Tools.CentralY())
        Animation(self.Arrow1,'accel_decel',5,None,y=60)
        Animation(self.Line2,'accel_decel',5,None,y=Tools.CentralY())
        Animation(self.Arrow2,'accel_decel',5,None,angle=-90,x=Data.WIDTH-340)
    def Update(self):
        screen.fill((0,0,0))
        screen.draw.text("不大好理解？请看下面的演示",(100,100),"osans4.ttf")
        self.Line1.draw()
        self.Line2.draw()
        self.Arrow1.draw()
        self.Arrow2.draw()
        